Optimal. Leaf size=109 \[ -\frac {8 i (a+i a \tan (c+d x))^9}{9 a^4 d}+\frac {6 i (a+i a \tan (c+d x))^{10}}{5 a^5 d}-\frac {6 i (a+i a \tan (c+d x))^{11}}{11 a^6 d}+\frac {i (a+i a \tan (c+d x))^{12}}{12 a^7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45}
\begin {gather*} \frac {i (a+i a \tan (c+d x))^{12}}{12 a^7 d}-\frac {6 i (a+i a \tan (c+d x))^{11}}{11 a^6 d}+\frac {6 i (a+i a \tan (c+d x))^{10}}{5 a^5 d}-\frac {8 i (a+i a \tan (c+d x))^9}{9 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rubi steps
\begin {align*} \int \sec ^8(c+d x) (a+i a \tan (c+d x))^5 \, dx &=-\frac {i \text {Subst}\left (\int (a-x)^3 (a+x)^8 \, dx,x,i a \tan (c+d x)\right )}{a^7 d}\\ &=-\frac {i \text {Subst}\left (\int \left (8 a^3 (a+x)^8-12 a^2 (a+x)^9+6 a (a+x)^{10}-(a+x)^{11}\right ) \, dx,x,i a \tan (c+d x)\right )}{a^7 d}\\ &=-\frac {8 i (a+i a \tan (c+d x))^9}{9 a^4 d}+\frac {6 i (a+i a \tan (c+d x))^{10}}{5 a^5 d}-\frac {6 i (a+i a \tan (c+d x))^{11}}{11 a^6 d}+\frac {i (a+i a \tan (c+d x))^{12}}{12 a^7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.79, size = 167, normalized size = 1.53 \begin {gather*} \frac {a^5 \sec (c) \sec ^{12}(c+d x) (924 i \cos (c)+792 i \cos (c+2 d x)+792 i \cos (3 c+2 d x)+495 i \cos (3 c+4 d x)+495 i \cos (5 c+4 d x)-924 \sin (c)+792 \sin (c+2 d x)-792 \sin (3 c+2 d x)+495 \sin (3 c+4 d x)-495 \sin (5 c+4 d x)+440 \sin (5 c+6 d x)+132 \sin (7 c+8 d x)+24 \sin (9 c+10 d x)+2 \sin (11 c+12 d x))}{3960 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 376 vs. \(2 (93 ) = 186\).
time = 0.28, size = 377, normalized size = 3.46
method | result | size |
risch | \(\frac {1024 i a^{5} \left (495 \,{\mathrm e}^{16 i \left (d x +c \right )}+792 \,{\mathrm e}^{14 i \left (d x +c \right )}+924 \,{\mathrm e}^{12 i \left (d x +c \right )}+792 \,{\mathrm e}^{10 i \left (d x +c \right )}+495 \,{\mathrm e}^{8 i \left (d x +c \right )}+220 \,{\mathrm e}^{6 i \left (d x +c \right )}+66 \,{\mathrm e}^{4 i \left (d x +c \right )}+12 \,{\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{495 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{12}}\) | \(113\) |
derivativedivides | \(\frac {i a^{5} \left (\frac {\sin ^{6}\left (d x +c \right )}{12 \cos \left (d x +c \right )^{12}}+\frac {\sin ^{6}\left (d x +c \right )}{20 \cos \left (d x +c \right )^{10}}+\frac {\sin ^{6}\left (d x +c \right )}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin ^{6}\left (d x +c \right )}{120 \cos \left (d x +c \right )^{6}}\right )+5 a^{5} \left (\frac {\sin ^{5}\left (d x +c \right )}{11 \cos \left (d x +c \right )^{11}}+\frac {2 \left (\sin ^{5}\left (d x +c \right )\right )}{33 \cos \left (d x +c \right )^{9}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{231 \cos \left (d x +c \right )^{7}}+\frac {16 \left (\sin ^{5}\left (d x +c \right )\right )}{1155 \cos \left (d x +c \right )^{5}}\right )-10 i a^{5} \left (\frac {\sin ^{4}\left (d x +c \right )}{10 \cos \left (d x +c \right )^{10}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin ^{4}\left (d x +c \right )}{20 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{4}\left (d x +c \right )}{40 \cos \left (d x +c \right )^{4}}\right )-10 a^{5} \left (\frac {\sin ^{3}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \left (\sin ^{3}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{3}}\right )+\frac {5 i a^{5}}{8 \cos \left (d x +c \right )^{8}}-a^{5} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )}{d}\) | \(377\) |
default | \(\frac {i a^{5} \left (\frac {\sin ^{6}\left (d x +c \right )}{12 \cos \left (d x +c \right )^{12}}+\frac {\sin ^{6}\left (d x +c \right )}{20 \cos \left (d x +c \right )^{10}}+\frac {\sin ^{6}\left (d x +c \right )}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin ^{6}\left (d x +c \right )}{120 \cos \left (d x +c \right )^{6}}\right )+5 a^{5} \left (\frac {\sin ^{5}\left (d x +c \right )}{11 \cos \left (d x +c \right )^{11}}+\frac {2 \left (\sin ^{5}\left (d x +c \right )\right )}{33 \cos \left (d x +c \right )^{9}}+\frac {8 \left (\sin ^{5}\left (d x +c \right )\right )}{231 \cos \left (d x +c \right )^{7}}+\frac {16 \left (\sin ^{5}\left (d x +c \right )\right )}{1155 \cos \left (d x +c \right )^{5}}\right )-10 i a^{5} \left (\frac {\sin ^{4}\left (d x +c \right )}{10 \cos \left (d x +c \right )^{10}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{40 \cos \left (d x +c \right )^{8}}+\frac {\sin ^{4}\left (d x +c \right )}{20 \cos \left (d x +c \right )^{6}}+\frac {\sin ^{4}\left (d x +c \right )}{40 \cos \left (d x +c \right )^{4}}\right )-10 a^{5} \left (\frac {\sin ^{3}\left (d x +c \right )}{9 \cos \left (d x +c \right )^{9}}+\frac {2 \left (\sin ^{3}\left (d x +c \right )\right )}{21 \cos \left (d x +c \right )^{7}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{5}}+\frac {16 \left (\sin ^{3}\left (d x +c \right )\right )}{315 \cos \left (d x +c \right )^{3}}\right )+\frac {5 i a^{5}}{8 \cos \left (d x +c \right )^{8}}-a^{5} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )}{d}\) | \(377\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 160, normalized size = 1.47 \begin {gather*} -\frac {-165 i \, a^{5} \tan \left (d x + c\right )^{12} - 900 \, a^{5} \tan \left (d x + c\right )^{11} + 1386 i \, a^{5} \tan \left (d x + c\right )^{10} - 1100 \, a^{5} \tan \left (d x + c\right )^{9} + 5445 i \, a^{5} \tan \left (d x + c\right )^{8} + 3960 \, a^{5} \tan \left (d x + c\right )^{7} + 4620 i \, a^{5} \tan \left (d x + c\right )^{6} + 8712 \, a^{5} \tan \left (d x + c\right )^{5} - 2475 i \, a^{5} \tan \left (d x + c\right )^{4} + 4620 \, a^{5} \tan \left (d x + c\right )^{3} - 4950 i \, a^{5} \tan \left (d x + c\right )^{2} - 1980 \, a^{5} \tan \left (d x + c\right )}{1980 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 267 vs. \(2 (85) = 170\).
time = 0.36, size = 267, normalized size = 2.45 \begin {gather*} -\frac {1024 \, {\left (-495 i \, a^{5} e^{\left (16 i \, d x + 16 i \, c\right )} - 792 i \, a^{5} e^{\left (14 i \, d x + 14 i \, c\right )} - 924 i \, a^{5} e^{\left (12 i \, d x + 12 i \, c\right )} - 792 i \, a^{5} e^{\left (10 i \, d x + 10 i \, c\right )} - 495 i \, a^{5} e^{\left (8 i \, d x + 8 i \, c\right )} - 220 i \, a^{5} e^{\left (6 i \, d x + 6 i \, c\right )} - 66 i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )} - 12 i \, a^{5} e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{5}\right )}}{495 \, {\left (d e^{\left (24 i \, d x + 24 i \, c\right )} + 12 \, d e^{\left (22 i \, d x + 22 i \, c\right )} + 66 \, d e^{\left (20 i \, d x + 20 i \, c\right )} + 220 \, d e^{\left (18 i \, d x + 18 i \, c\right )} + 495 \, d e^{\left (16 i \, d x + 16 i \, c\right )} + 792 \, d e^{\left (14 i \, d x + 14 i \, c\right )} + 924 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 792 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 495 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 220 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 66 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 12 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a^{5} \left (\int \left (- i \sec ^{8}{\left (c + d x \right )}\right )\, dx + \int 5 \tan {\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int \left (- 10 \tan ^{3}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\right )\, dx + \int \tan ^{5}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int 10 i \tan ^{2}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\, dx + \int \left (- 5 i \tan ^{4}{\left (c + d x \right )} \sec ^{8}{\left (c + d x \right )}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.98, size = 160, normalized size = 1.47 \begin {gather*} -\frac {-165 i \, a^{5} \tan \left (d x + c\right )^{12} - 900 \, a^{5} \tan \left (d x + c\right )^{11} + 1386 i \, a^{5} \tan \left (d x + c\right )^{10} - 1100 \, a^{5} \tan \left (d x + c\right )^{9} + 5445 i \, a^{5} \tan \left (d x + c\right )^{8} + 3960 \, a^{5} \tan \left (d x + c\right )^{7} + 4620 i \, a^{5} \tan \left (d x + c\right )^{6} + 8712 \, a^{5} \tan \left (d x + c\right )^{5} - 2475 i \, a^{5} \tan \left (d x + c\right )^{4} + 4620 \, a^{5} \tan \left (d x + c\right )^{3} - 4950 i \, a^{5} \tan \left (d x + c\right )^{2} - 1980 \, a^{5} \tan \left (d x + c\right )}{1980 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.71, size = 146, normalized size = 1.34 \begin {gather*} \frac {a^5\,\left (-{\cos \left (c+d\,x\right )}^{12}\,1749{}\mathrm {i}+2048\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^{11}+1024\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^9+768\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^7+640\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^5+{\cos \left (c+d\,x\right )}^4\,3960{}\mathrm {i}-3400\,\sin \left (c+d\,x\right )\,{\cos \left (c+d\,x\right )}^3-{\cos \left (c+d\,x\right )}^2\,2376{}\mathrm {i}+900\,\sin \left (c+d\,x\right )\,\cos \left (c+d\,x\right )+165{}\mathrm {i}\right )}{1980\,d\,{\cos \left (c+d\,x\right )}^{12}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________